package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("community_comment")
public class Comment {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private Long postId;  // 帖子ID
    
    private Long userId;  // 评论用户ID
    
    private Long parentId;  // 父评论ID，用于回复功能
    
    private Long replyToUserId;  // 被回复用户ID
    
    private String content;  // 评论内容
    
    private Integer likeCount;  // 点赞数
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
    
    private Integer status;  // 0-正常 1-已删除
} 